<div class="medical-cells"></div>
<div class="kk-foot " id="kk-foot">
    <div class="medical-list">
        <div style="padding:2px" class="scrol"></div>
    </div>
    <div style="padding: 3px;display: flex">
        <div class="col-10" style="text-align: left"><input id="medical-search" style="width:98%"/></div>
        <div class="col-2"><a class="short-btn">常用方</a></div>
    </div>
    <div>
        <a class="weui-btn weui-btn_plain-default" onclick="selectMedicalDone()" href="javacript:void(0);">完成选药</a>
    </div>
</div>
<script>

    setTimeout(function(){
        $("#medical-search").trigger("focus");
    },600)


    $("#medical-search").on("keyup",function(){
       var key = $.trim($("#medical-search").val());
       if(key==""){
           $(".scrol").html("");
           return ;
       }
       $(".scrol").load("/chm/searchMedical?key="+key+"&doctorId="+doctorId);
    });

    function selectMedicalDone(){
        $(".medical-cells .short-input").each(function(){
            $(this).attr('value',$(this).val());
        });

        $.kkclosePopup();
        chargeFee();
        showMedicalList();
    }

    $(".medical-cells").on("click",".medical-cell i",function(){
        $(this).parent().remove();
    });

</script>